option = {
    title: {
      text: "各月收支表",
      left: "center",
      bottom: "5%",
      textStyle: {
        fontSize: 30,
        color:"#1FC3CE"
      }
    },

    backgroundColor: '#031A32',
    tooltip: {
        trigger: "axis",
        axisPointer: {
            type: "shadow",
            label: {
                show: true
            }
        },
        formatter(params) {
            var relVal = params[0].name;
            for (var i = 0, l = params.length; i < l; i++) {
                console.log('tooltip数据值',params[i].value)
                //遍历出来的值一般是字符串，需要转换成数字，再进项tiFixed四舍五入
                //relVal += '<br/>' + params[i].marker + params[i].seriesName + ' : ' + Number(params[i].value).toFixed(2)
                relVal += '<br/>' + params[i].marker + params[i].seriesName + ' : ' + Number(params[i].value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
            }
            return relVal;
        },


    },
    grid: {
        left: "10%",
        top: "18%",
        right: "5%",
        bottom: "22%"
    },
    legend: {
        data: ["各月收入", "各月支出"],
        top: "10%",
        right:"5%",
        textStyle: {
            color: "#1FC3CE",
            fontSize: 14
        },
        selected: {'昨日使用率': false} // 不需要显示的设置为false
    },
    xAxis: {
        data: [
            "2022.01",
            "2022.02",
            "2022.03",
            "2022.04",
            "2022.05",
            "2022.06",
            "2022.07",
            "2022.08",
            "2022.09",
            "2022.10",
            "2022.11",
            "2022.12"
        ],
        axisLine: {
            show: true, //隐藏X轴轴线
            lineStyle: {
                color: "#3d5269",
                width: 1
            }
        },
        axisTick: {
            show: true, //隐藏X轴刻度
            alignWithLabel: true
        },
        axisLabel: {
            show: true,
            textStyle: {
                color: "#396A87", //X轴文字颜色
                fontSize: 14
            },
            interval: 0,
            rotate: 30
        }
    },
    yAxis: [{
            type: "value",
            name: "金额",
            nameTextStyle: {
                color: "#396A87",
                fontSize: 14
            },
            splitLine: {
                show: true,
                lineStyle: {
                    width: 1,
                    color: "#3d5269"
                }
            },
            axisTick: {
                show: true
            },
            axisLine: {
                show: true
            },
            axisLabel: {
                show: true,
                textStyle: {
                    color: "#396A87",
                    fontSize: 14
                },
                // 内容格式器
                formatter:function(value,index){
                    return value.toFixed(1)
                }
            }
        }
    ],
    series: [{
            name: "各月收入",
            type: "bar",
            barWidth: 18,
            itemStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: "#00FFFF"
                        },
                        {
                            offset: 1,
                            color: "#0080FF"
                        }
                    ])
                }
            },
            data: [24.1111111, 45, 43, 35, 76, 154, 86, 42, 68, 97, 24, 34]
        },
        {
            name: "各月支出",
            type: "bar",
            barWidth: 18,
            itemStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: "#E29052"
                        },
                        {
                            offset: 1,
                            color: "#FA5A53"
                        }
                    ])
                }
            },
            data: [133, 23, 114, 67, 89, 35, 67, 96, 90, 46, 75, 85]
        }
    ]
}